#!/bin/bash
nginx() {
ansible-playbook -i hosts   nginx.yml
}
tomcat() {
ansible-playbook -i hosts   tomcat.yml
}
mysql() {
ansible-playbook -i hosts   mysql.yml
}
all() {
ansible-playbook -i hosts   all.yml
}
updata_tomcat() {
ansible-playbook -i hosts   updata_tomcat.yml
}


case $1 in
        nginx)
               nginx
        ;;
        tomcat)
               tomcat
        ;;
        mysql)
               mysql
        ;;
        all)
               all
        ;;
        updata_tomcat)
               updata_tomcat
        ;;
        *)
echo "Usage: $0 {nginx|tomcat|mysql|all|updata_tomcat}"
    exit 1
esac
